package com.ruoyi.system.service.impl;

import com.alibaba.fastjson2.JSON;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.AcIndex;
import com.ruoyi.system.domain.AcWorkOrder;
import com.ruoyi.system.mapper.AcIocMapper;
import com.ruoyi.system.mapper.AcWorkOrderMapper;
import com.ruoyi.system.service.IAcIocService;
import com.ruoyi.system.service.IAcWorkOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import redis.clients.jedis.Jedis;

import java.util.*;

/**
 * 保养维护工单Service业务层处理
 *
 * @author ruoyi
 * @date 2025-03-06
 */
@Service
public class AcIocServiceImpl implements IAcIocService
{
    @Autowired
    private AcIocMapper acIocMapper;


    @Override
    public List<AcIndex>  getAssetInfo(AcIndex acIndex)
    {
        if ( acIndex.getDeptId() == null){
        acIndex.setDeptId(SecurityUtils.getDeptId());
    }
        return acIocMapper.getAssetInfo(acIndex);
    }

    @Override
    public List<AcIndex>  getAssetStatus(AcIndex acIndex)
    {
        if ( acIndex.getDeptId() == null){
            acIndex.setDeptId(SecurityUtils.getDeptId());
        }
        return acIocMapper.getAssetStatus(acIndex);
    }
    @Override
    public List<AcIndex>  getAssetDistrict(AcIndex acIndex)
    {
        if ( acIndex.getDeptId() == null){
            acIndex.setDeptId(SecurityUtils.getDeptId());
        }
        return acIocMapper.getAssetDistrict(acIndex);
    }

    @Override
    public List<AcIndex>  getAssetBelong(AcIndex acIndex)
    {
        if ( acIndex.getDeptId() == null){
            acIndex.setDeptId(SecurityUtils.getDeptId());
        }
        return acIocMapper.getAssetBelong(acIndex);
    }

    @Override
    public List<AcIndex>  getAssetRent(AcIndex acIndex)
    {
        if ( acIndex.getDeptId() == null){
            acIndex.setDeptId(SecurityUtils.getDeptId());
        }
        return acIocMapper.getAssetRent(acIndex);
    }
    @Override
    public List<AcIndex>  getAssetCredit(AcIndex acIndex)
    {
        if ( acIndex.getDeptId() == null){
            acIndex.setDeptId(SecurityUtils.getDeptId());
        }
        return acIocMapper.getAssetCredit(acIndex);
    }

}
